package com.ddxz.middleground.master.util;

import com.ddxz.tool.core.common.DdxzStatus;

/**
 * enum description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/7/27
 */

public enum ErrorStatus implements DdxzStatus {
    /**
     * 主模块错误信息汇总清单
     */
    DEPT_NOT_EXISTS(13001, "部门不存在"),
    DEPT_NAME_REPEAT(13002, "部门名称[{}]或编码[{}]已存在"),
    DEPT_NOT_EMPTY(13003, "当前部门存在子部门，无法删除"),
    DEPT_HAS_EMPLOYEE(13004, "当前部门存在员工，无法删除"),
    INVALID_DIRECTION(13005, "无效的移动方向"),
    CANNOT_DOWN(13006, "无法下移"),
    CANNOT_UP(13007, "无法上移"),
    CANNOT_INC(13008, "无法升级"),
    CANNOT_DEC(13009, "无法降级"),
    LOGIN_NAME_REPEAT(13010, "登陆名称重复"),
    USER_NOT_EXISTS(13011, "用户不存在"),
    ERROR_PASSWORD(13012, "密码不正确"),
    ROLE_NOT_EXISTS(13013, "角色不存在"),
    ROLE_NAME_REPEAT(13014, "角色名称重复"),
    ROLE_CODE_REPEAT(13015, "角色编码重复"),
    ROLE_HAS_USER(13016, "角色下有绑定的用户"),
    INVALID_STATUS(13017, "无效的状态值"),
    INVALID_GENDER(13018, "无效的性别值"),
    INVALID_EDUCATION(13019, "无效的学历信息"),
    PASSWORD_ERROR(13020, "密码错误"),
    APP_NOT_EXISTS(13021, "应用不存在"),
    APP_NAME_REPEAT(13022, "应用名称已存在"),
    APP_CODE_REPEAT(13022, "应用编码已存在"),
    APP_HAS_MENU(13023, "应用包含菜单信息"),
    MENU_NAME_REPEAT(12024, "菜单名称重复"),
    MENU_CODE_REPEAT(12025, "菜单编码重复"),
    MENU_NOT_EXISTS(12026, "菜单不存在"),
    MENU_HAS_CHILDREN(12027, "菜单含有子菜单，不允许删除"),
    PERMISSION_NOT_EXISTS(12028, "权限不存在"),
    PERMISSION_NAME_REPEAT(12029, "权限名称重复"),
    PERMISSION_CODE_REPEAT(12030, "权限编码重复"),
    MENU_IN_USE(12031, "有权限使用该菜单"),
    PERMISSION_IN_USE(12032, "有角色使用该权限"),
    NO_ROLE_BIND(12033, "当前用户未绑定角色"),
    NO_PERMISSION_BIND(12034, "当前角色均未绑定权限");

    private Integer status;

    private String message;

    ErrorStatus(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    @Override
    public Integer getStatus() {
        return status;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
